<template>
	<el-dialog
		title="会员账单详情"
		:visible="true"
		width="1200px"
		class="rempadding"
		:destroy-on-close="true"
		:before-close="handleClose"
		@close="handleClose"
	>
		<div class="contentBox mt30">
			{{ dayjs(String(curData.cycleStartDate)).format('YYYY-MM-DD') }}
			00:00:00 至
			{{ dayjs(String(curData.cycleEndDate)).format('YYYY-MM-DD') }}
			23:59:59
		</div>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="data"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column align="center" label="会员账号">
				{{ curData.memberName }}
			</el-table-column>
			<el-table-column prop="userName" align="center" label="本期盈亏">
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						本期盈亏
						<el-tooltip
							class="item"
							effect="dark"
							content="汇总德州+体育+真人+电竞+棋牌+彩票+电子+其他八个项目的盈亏之和"
							placement="top-start"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>

				<span :style="handleNumberColor(curData.netAmount)">
					{{
						handleTotalNumber(
							'USDT',
							curData.netAmount,
							2,
							true,
							true
						)
					}}
				</span>
			</el-table-column>
			<el-table-column prop="userName" align="center">
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						其他资金变动
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								统计非游戏盈亏类目的资金增减变动
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<span :style="handleNumberColor(curData.adjustmentAmount)">
					{{
						handleTotalNumber(
							'USDT',
							curData.adjustmentAmount,
							2,
							true,
							true
						)
					}}
				</span>
			</el-table-column>
			<el-table-column
				prop="userName"
				align="center"
				:label="`上期应收上级`"
			>
				<span
					v-if="
						curData.lastPeriodShouldReceiptPaymentParentAmount > 0
					"
				>
					{{
						handleTotalNumber(
							'USDT',
							Math.abs(
								curData.lastPeriodShouldReceiptPaymentParentAmount
							),
							2
						)
					}}
				</span>
				<span v-else>$0.00</span>
			</el-table-column>
			<el-table-column
				prop="userName"
				align="center"
				:label="`上期应付上级`"
			>
				<span
					v-if="
						curData.lastPeriodShouldReceiptPaymentParentAmount < 0
					"
				>
					{{
						handleTotalNumber(
							'USDT',
							Math.abs(
								curData.lastPeriodShouldReceiptPaymentParentAmount
							),
							2
						)
					}}
				</span>
				<span v-else>$0.00</span>
			</el-table-column>
			<el-table-column prop="userName" align="center">
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						{{
							curData.shouldPaymentReceiptParentAmount < 0
								? '应付上级'
								: '应收上级'
						}}
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								{{
									curData.shouldPaymentReceiptParentAmount < 0
										? '本期盈亏+其他资金变动+上期应收上级-上期应付上级<0的金额'
										: '本期盈亏+其他资金变动+上期应收上级-上期应付上级>=0的金额'
								}}
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<span>
					{{
						handleTotalNumber(
							'USDT',
							Math.abs(curData.shouldPaymentReceiptParentAmount),
							2
						)
					}}
				</span>
			</el-table-column>
		</el-table>

		<div class="contentBox mt30">
			本期盈亏：
			<span :style="handleNumberColor(curData.netAmount)">
				{{
					handleTotalNumber('USDT', curData.netAmount, 2, true, true)
				}}
			</span>
		</div>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="data"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column prop="dxClubNetAmount" align="center" label="">
				<template slot-scope="scope">德州场馆</template>
			</el-table-column>
			<el-table-column
				prop="dxClubNetAmount"
				align="center"
				label="俱乐部游戏输赢"
			>
				<template slot-scope="scope">
					<span :style="handleNumberColor(scope.row.dxClubNetAmount)">
						{{
							handleTotalNumber(
								'USDT',
								scope.row.dxClubNetAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="dxSquidNetAmount"
				align="center"
				label="鱿鱼游戏输赢"
			>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(scope.row.dxSquidNetAmount)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.dxSquidNetAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<!-- <el-table-column
				prop="serviceChargeHandAmount"
				align="center"
				label="手牌服务费"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						手牌服务费
						<el-tooltip
							class="item"
							effect="dark"
							content="会员被收取的手牌服务费之和"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span :style="handleNumberColor(scope.row.serviceChargeHandAmount)">
					{{
						handleTotalNumber('USDT', scope.row.serviceChargeHandAmount, 2, true, true)
					}}
					</span>
				</template>
			</el-table-column> -->
			<el-table-column
				prop="serviceChargeRoundAmount"
				align="center"
				label="局服务费"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						局服务费
						<el-tooltip
							class="item"
							effect="dark"
							content="会员被收取的局服务费之和"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(
								scope.row.serviceChargeRoundAmount
							)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.serviceChargeRoundAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="dxInsureNetAmount"
				align="center"
				label="保险投注输赢"
			>
				<template slot-scope="scope">
					<span
						:style="handleNumberColor(scope.row.dxInsureNetAmount)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.dxInsureNetAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="valueAddedTotalAmount"
				align="center"
				label="增值服务消费"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						增值服务消费
						<el-tooltip
							class="item"
							effect="dark"
							content="会员在德州场馆内因增值服务、商城、返利等功能引起的资金变动。"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(scope.row.valueAddedTotalAmount)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.valueAddedTotalAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="rebateAmount"
				align="center"
				label="返水金额"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						返水金额
						<el-tooltip
							class="item"
							effect="dark"
							content="统计当期获得的返水金额; 公式：服务费贡献*返水比例；公式仅作参考测算，测算结果不等同实际发放金额"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span :style="handleNumberColor(scope.row.rebateAmount)">
						{{
							handleTotalNumber(
								'USDT',
								scope.row.rebateAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="dxMemberNetAmount"
				align="center"
				label="会员盈亏"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						会员盈亏
						<el-tooltip
							class="item"
							effect="dark"
							content="汇总德州场馆盈亏的总额; 公式：俱乐部游戏输赢+鱿鱼游戏输赢+局服务费+保险投注输赢+增值服务消费+返水金额"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="handleNumberColor(scope.row.dxMemberNetAmount)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.dxMemberNetAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
		</el-table>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="data"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column prop="dxClubNetAmount" align="center" label="">
				<template slot-scope="scope">德州场馆</template>
			</el-table-column>
			<el-table-column
				prop="serviceChargeContributionAmount"
				align="center"
				label="俱乐部服务费贡献"
			>
				<template slot-scope="scope">
					{{
						handleTotalNumber(
							'USDT',
							scope.row.serviceChargeContributionAmount
						)
					}}
				</template>
			</el-table-column>
			<el-table-column
				prop="dxInsureBetAmount"
				align="center"
				label="保险投注金额"
			>
				<template slot-scope="scope">
					{{ handleTotalNumber('USDT', scope.row.dxInsureBetAmount) }}
				</template>
			</el-table-column>
			<el-table-column
				prop="dxInsureValidBetAmount"
				align="center"
				label="保险有效投注"
			>
				<template slot-scope="scope">
					{{
						handleTotalNumber(
							'USDT',
							scope.row.dxInsureValidBetAmount
						)
					}}
				</template>
			</el-table-column>
		</el-table>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="dialogTableData1"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column prop="userName" align="center" label="">
				<template slot-scope="scope">
					{{ scope.row.label }}
				</template>
			</el-table-column>
			<el-table-column prop="listData1" align="center" label="游戏输赢">
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData1 != '/'"
						:style="handleNumberColor(scope.row.listData1)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.listData1,
								2,
								true,
								true
							)
						}}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="listData5"
				align="center"
				label="输赢重算调整"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						输赢重算调整
						<el-tooltip
							class="item"
							effect="dark"
							content="统计当期因注单重算而导致的输赢金额调整"
							placement="top-start"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData5 != '/'"
						:style="handleNumberColor(scope.row.listData5)"
					>
						{{ handleNumber('USDT', scope.row.listData5, 2) }}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column>
			<el-table-column prop="listData2" align="center" label="返水金额">
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						返水金额
						<el-tooltip
							class="item"
							effect="dark"
							content="统计当期获得的返水金额; 公式：有效投注*返水比例；公式仅作参考测算，测算结果不等同实际发放金额"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData2 != '/'"
						:style="handleNumberColor(scope.row.listData2)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.listData2,
								2,
								true,
								true
							)
						}}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="listData6"
				align="center"
				label="返水重算调整"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						返水重算调整
						<el-tooltip
							class="item"
							effect="dark"
							content="统计当期因注单重算而导致的返水金额调整"
							placement="top-start"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData6 != '/'"
						:style="handleNumberColor(scope.row.listData6)"
					>
						{{ handleNumber('USDT', scope.row.listData6, 2) }}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column>
			<el-table-column prop="listData3" align="center" label="其他收支项">
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						其他收支项
						<el-tooltip
							class="item"
							effect="dark"
							content="统计日期内会员的其他收支项，包含：真人打赏、电子活动奖金"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData3 != '/'"
						:style="handleNumberColor(scope.row.listData3)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.listData3,
								2,
								true,
								true
							)
						}}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column>
			<el-table-column prop="listData4" align="center" label="会员盈亏">
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						会员盈亏
						<el-tooltip
							class="item"
							effect="dark"
							content="汇总其他场馆盈亏的总额公式：会员游戏输赢+输赢重算调整+返水金额+返水重算调整+其他收支"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						v-if="scope.row.listData4 != '/'"
						:style="handleNumberColor(scope.row.listData4)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.listData4,
								2,
								true,
								true
							)
						}}
					</span>
					<span v-else>/</span>
				</template>
			</el-table-column>
		</el-table>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="data"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column prop="userName" align="center" label="">
				<template slot-scope="scope">有效投注</template>
			</el-table-column>
			<el-table-column
				prop="tyValidBetAmount"
				align="center"
				label="体育"
			>
				<template slot-scope="scope">
					{{ handleTotalNumber('USDT', scope.row.tyValidBetAmount) }}
				</template>
			</el-table-column>
			<el-table-column
				prop="djValidBetAmount"
				align="center"
				label="电竞"
			>
				<template slot-scope="scope">
					{{ handleTotalNumber('USDT', scope.row.djValidBetAmount) }}
				</template>
			</el-table-column>
			<el-table-column
				prop="qpValidBetAmount"
				align="center"
				label="棋牌"
			>
				<template slot-scope="scope">
					{{ handleTotalNumber('USDT', scope.row.qpValidBetAmount) }}
				</template>
			</el-table-column>
			<el-table-column
				prop="cpValidBetAmount"
				align="center"
				label="彩票"
			>
				<template slot-scope="scope">
					{{ handleTotalNumber('USDT', scope.row.cpValidBetAmount) }}
				</template>
			</el-table-column>
			<el-table-column prop="userName" align="center" label="电子">
				<template slot-scope="scope">
					<span>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.dyValidBetAmount
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="zrValidBetAmount"
				align="center"
				label="真人"
			>
				<template slot-scope="scope">
					{{ handleTotalNumber('USDT', scope.row.zrValidBetAmount) }}
				</template>
			</el-table-column>
		</el-table>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="data"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column prop="userName" align="center" label="">
				<template slot-scope="scope">其他</template>
			</el-table-column>
			<el-table-column
				prop="rebateAdjustmentAmount"
				align="center"
				label="返水调整"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						返水调整
						<el-tooltip
							class="item"
							effect="dark"
							content="平台对返水金额进行增加或扣除调整的金额"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(scope.row.rebateAdjustmentAmount)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.rebateAdjustmentAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="accountAdjustmentAmount"
				align="center"
				label="账户调整"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						账户调整
						<el-tooltip
							class="item"
							effect="dark"
							content="平台对账户进行增加或扣除调整的金额"
							placement="top"
						>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(scope.row.accountAdjustmentAmount)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.accountAdjustmentAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="otherTotalNetAmount"
				align="center"
				label="其他盈亏总计"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						其他盈亏总计
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								汇总其他项盈亏的总额; 公式：账户调整+返水调整
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(scope.row.otherTotalNetAmount)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.otherTotalNetAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
		</el-table>
		<div class="contentBox mt30">
			其他资金变动：
			<span :style="handleNumberColor(curData.adjustmentAmount)">
				{{
					handleTotalNumber(
						'USDT',
						curData.adjustmentAmount,
						2,
						true,
						true
					)
				}}
			</span>
		</div>
		<el-table
			v-loading="loading"
			element-loading-spinner="el-icon-loading"
			size="mini"
			class="small-size-table"
			:data="data"
			style="width: 100%; margin: 15px 0"
			:header-cell-style="getRowClass"
			highlight-current-row
		>
			<el-table-column
				prop="parentCashUpAmount"
				align="center"
				label="上级给会员充值"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						上级给会员充值
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								统计当期被上级现金充值上分的总额
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="handleNumberColor(scope.row.parentCashUpAmount)"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.parentCashUpAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="parentCashDownAmount"
				align="center"
				label="上级给会员提现"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						上级给会员提现
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								统计当期被上级现金提现下分的总额
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(scope.row.parentCashDownAmount)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.parentCashDownAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="parentCreditRepaymentAmount"
				align="center"
				label="上级帮会员还款"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						上级帮会员还款
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								统计当期被上级现金或信用还款的总额
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(
								scope.row.parentCreditRepaymentAmount
							)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.parentCreditRepaymentAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
			<el-table-column
				prop="otherAdjustmentTotalAmount"
				align="center"
				label="其他资金变动总计"
			>
				<template slot="header" slot-scope="{ column, $index }">
					<span>
						其他资金变动总计
						<el-tooltip
							class="item"
							effect="dark"
							placement="top-start"
						>
							<span slot="content">
								汇总上级给会员的充值、提现、还款的总额;
								公式：上级给会员充值+上级给会员提现+上级帮会员还款
							</span>
							<i class="el-icon-question"></i>
						</el-tooltip>
					</span>
				</template>
				<template slot-scope="scope">
					<span
						:style="
							handleNumberColor(
								scope.row.otherAdjustmentTotalAmount
							)
						"
					>
						{{
							handleTotalNumber(
								'USDT',
								scope.row.otherAdjustmentTotalAmount,
								2,
								true,
								true
							)
						}}
					</span>
				</template>
			</el-table-column>
		</el-table>
	</el-dialog>
</template>

<script>
import list from '@/mixins/list'
import dayjs from 'dayjs'

export default {
  components: {},
  mixins: [list],
  props: {
    curData: {
      type: Object,
      default: () => { }
    },
    visible: {
      type: Boolean,
      default: false
    },
    handleVisible: {
      type: Object,
      default: () => { }
    }
  },
  data() {
    return {
      dayjs,
      loading: false,
      businessModelData: '',
      data: [],
      other1: [],
      other2: [],
      other3: [],
      agentListSwitch: true,
      memberListSwitch: true,
      dialogTableData1: []
    }
  },
  watch: {
    curData: {
      handler(newVal) {
        if (!newVal) return
        this.getData()
      },
      deep: true
    }
  },
  created() {
    this.typeStr = this.curData.type == 0 ? '应付' : '应收'
    this.getData()
    // 获取团队返点比例
    // this.getQueryData()
  },
  methods: {
    // 获取代理账号信息
    getData() {
      this.dialogTableData1 = []
      this.loading = true
      this.$api
        .memberTeamBillDetail({
          memberId: this.curData.memberId,
          cycleEndDate: this.curData.cycleEndDate,
          cycleStartDate: this.curData.cycleStartDate
        })
        .then((res) => {
          this.loading = false
          this.data = [res.data || {}]
          const list1 = [
            '体育',
            '电竞',
            '棋牌',
            '彩票',
            '电子',
            '真人',
            '总计'
          ]
          for (const index in list1) {
            const e = {
              label: list1[index]
            }
            if (list1[index] == '体育') {
              (e.listData1 = res.data.tyNetAmount),
                (e.listData2 = res.data.tyRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.tyMemberNetAmount),
                (e.listData5 = res.data.tyNetRecalculationAdjustmentAmount),
                (e.listData6 = res.data.tyRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '电竞') {
              (e.listData1 = res.data.djNetAmount),
                (e.listData2 = res.data.djRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.djMemberNetAmount),
                (e.listData5 = res.data.djNetRecalculationAdjustmentAmount),
                (e.listData6 = res.data.djRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '棋牌') {
              (e.listData1 = res.data.qpNetAmount),
                (e.listData2 = res.data.qpRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.qpMemberNetAmount),
                (e.listData5 = res.data.qpNetRecalculationAdjustmentAmount),
                (e.listData6 = res.data.qpRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '彩票') {
              (e.listData1 = res.data.cpNetAmount),
                (e.listData2 = res.data.cpRebateAmount),
                (e.listData3 = '/'),
                (e.listData4 = res.data.cpMemberNetAmount),
                (e.listData5 = res.data.cpNetRecalculationAdjustmentAmount),
                (e.listData6 = res.data.cpRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '电子') {
              (e.listData1 = res.data.dyNetAmount),
                (e.listData2 = res.data.dyRebateAmount),
                (e.listData3 = res.data.dyOtherIncomeAmount),
                (e.listData4 = res.data.dyMemberNetAmount),
                (e.listData5 = res.data.dyNetRecalculationAdjustmentAmount),
                (e.listData6 = res.data.dyRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '真人') {
              (e.listData1 = res.data.zrNetAmount),
                (e.listData2 = res.data.zrRebateAmount),
                (e.listData3 = res.data.zrRewardAmount),
                (e.listData4 = res.data.zrMemberNetAmount),
                (e.listData5 = res.data.zrNetRecalculationAdjustmentAmount),
                (e.listData6 = res.data.zrRebateRecalculationAdjustmentAmount)
            } else if (list1[index] == '总计') {
              (e.listData1 = res.data.totalNetAmount),
                (e.listData2 = res.data.totalRebateAmount),
                (e.listData3 = res.data.totalRewardAmount),
                (e.listData4 = res.data.totalMemberNetAmount),
                (e.listData5 = res.data.netRecalculationAdjustmentAmountSub),
                (e.listData6 = res.data.rebateRecalculationAdjustmentAmountSub)
            }
            this.dialogTableData1.push(e)
          }
        })
        .catch(() => {
          this.loading = false
        })
    },
    handleClose() {
      this.$emit('update:visible', false)
    },
    getQueryData() {
      // merchantId  userId userType version
      this.$api
        .rebateRateQuery({
          merchantId: this.curData.merchantId,
          userId: this.curData.proxyId,
          version: this.curData.version || this.curData.rateVersion,
          userType: 1
        })
        .then((res) => {
          // platformFlag = 0, zhanchengFlag= 0  返点比例
          // platformFlag = 0, zhanchengFlag= 1  占成比例
          // platformFlag = 1 ,user_type = 2   会员返水
          this.other1 =
            res.data.filter(
              (ele) =>
                ele.platformFlag === 0 &&
                ele.zhanchengFlag === 0
            ) || []
          this.other2 =
            res.data.filter(
              (ele) =>
                ele.platformFlag === 0 &&
                ele.zhanchengFlag === 1
            ) || []
          this.other3 =
            res.data.filter(
              (ele) =>
                ele.platformFlag === 1 && ele.userType === 2
            ) || []
        })
    },
    getDateCircle(start, end) {
      const format = (str) =>
        `${str.substring(0, 4)}-${str.substring(4, 6)}-${str.substring(
          6,
          8
        )}`
      return `${format(start.toString())} - ${format(end.toString())}`
    }
  }
}
</script>

<style lang="scss" scoped>
::v-deep .rempadding .el-dialog__header {
	color: #909399;
	font-weight: 700;
}
::v-deep .rempadding .el-dialog__body {
	padding: 0;
	padding-bottom: 30px;
	.contentBox {
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.contentBox,
	form {
		padding: 0 20px;
	}
}
.contentBox {
	text-align: center;
	font-size: 18px;
	font-weight: bold;
}
.childer-box {
	width: 100%;
	display: flex;
	.silder {
		width: 25%;
		padding-right: 20px;
		.row {
			margin-top: 20px;
			.switch {
				cursor: pointer;
			}
		}
		.display-tow {
			display: flex;
			justify-content: space-between;
		}
		.lower-user {
			padding-left: 30px;
			margin-top: 10px;
			box-sizing: border-box;
			.list {
				padding: 5px 0;
			}
			.active {
				background: rgba(129, 211, 248, 1);
				color: #ffffff !important;
			}
		}
	}
	.table-content {
		width: 100%;
	}
}
</style>
